<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>存彩票</title>
		<style>
			.content{
				margin-top: 30%;
				text-align: center;
			}
		</style>
	</head>
		
	<body>
		<div class="content">
			<p class="step">扫描小票二维码</p>
			<div class="img-box">
				<img src="../images/qr_code.png" alt="" />
			</div>
		</div>

	</body>
	<script src="../config.js"></script>
	<script src="../js/mui.min.js"></script>
	<script>
		mui.init()
		mui.plusReady(function() {
			receiveParams()
			bindEvent()
			var currentShopObj = {}
		}) 

		function receiveParams() {
			var self = plus.webview.currentWebview()
			currentShopObj = self.currentShopObj
		}
		function bindEvent() {
			 mui('.img-box')[0].addEventListener('tap', function(){
      	 mui.openWindow({
          url: '../common/barcode.html',
          id: 'barcode',
          styles: {
            top: 0, //新页面顶部位置
            bottom: 0, //新页面底部位置
            titleNView: {
              titleText: '扫码',
              titleColor: "#FFFFFF",
              titleSize: "17px",
              backgroundColor: "#FF6800",
              autoBackButton: true,
              //                homeButton: true,
              buttons: [{
                float: "right",
                fontSize: "18px",
                fontSrc: "_www/fonts/iconfont.ttf", //wap2app内置字体文件
                text: "\ue602",
                onclick: function() {
                  var allPage = plus.webview.all()
                  var nowPage = plus.webview.getWebviewById('index')
                  for(var i = 0; i < allPage.length; i++) {
                    if(allPage[i].getURL() !== nowPage.getURL()) {
                      plus.webview.close(allPage[i]);
                    }
                  }
                }
              }],
              splitLine: {
                color: "#CCCCCC",
                height: "1px"
              }
            }
          },
          extras: {
            currentShopObj: currentShopObj,
            type: 2
          }
        })
      })
		}
	</script>

</html>